#!/bin/bash

# 指定Vue3项目的根目录和服务器上的上传路径
#PROJECT_PATH='/Users/ekwing/Documents/HZS/个人项目/vue3_project/projectManage/my-vue-app'

# 远程服务器信息
remote_host='120.48.84.169'
remote_user='root'
remote_password='3361570ziyiH'
remote_file_path='/home/testDeploy/'
local_file_path='dist/*'

#cd $PROJECT_PATH
# 使用scp命令进行上传
scp -r $local_file_path $remote_user:$remote_password@$remote_host:$remote_file_path

# 检查上传是否成功
if [ $? -eq 0 ]; then
    echo "上传成功"
else
    echo "上传失败"
fi